package com.zhang.demo

import android.app.Application
import android.os.Debug
import com.zhang.demo.injector.component.ApplicationComponent
import com.zhang.demo.injector.component.DaggerApplicationComponent
import com.zhang.demo.injector.module.ApplicationModule

/**
 * Created by zhangke on 2020/8/21 22:47
 * E-Mail Address：2426017569@qq.com
 */
class MyApplication : Application() {
    private lateinit var mApplicationComponent: ApplicationComponent
    override fun onCreate() {
        super.onCreate()

        mApplicationComponent =
            DaggerApplicationComponent.builder().applicationModule(ApplicationModule(this)).build()
        mApplicationComponent.inject(this)

    }

    fun getApplicationComponent(): ApplicationComponent? {
        return mApplicationComponent
    }
}